adding dnd functionality to change the order of the questions #31
+63
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces drag-and-drop functionality to the
ApplicationQuestionConfig
component and updates theApplicationQuestionCard
component to support this new feature. The most important changes include importing the necessary drag-and-drop components, adding the drag-and-drop context and handlers, and updating the card layout to include a drag handle.Enhancements to drag-and-drop functionality:
clients/core/src/Application/ApplicationConfiguration/ApplicationQuestionConfig/ApplicationQuestionConfig.tsx
: ImportedDragDropContext
,Draggable
,Droppable
, andDropResult
fromreact-beautiful-dnd
to enable drag-and-drop functionality.clients/core/src/Application/ApplicationConfiguration/ApplicationQuestionConfig/ApplicationQuestionConfig.tsx
: Added theonDragEnd
handler to update the order of questions when they are dragged and dropped.clients/core/src/Application/ApplicationConfiguration/ApplicationQuestionConfig/ApplicationQuestionConfig.tsx
: Wrapped the questions list inDragDropContext
andDroppable
, and made each questionDraggable
. [1] [2]UI improvements to
ApplicationQuestionCard
:clients/core/src/Application/ApplicationConfiguration/ApplicationQuestionConfig/components/ApplicationQuestionCard.tsx
: Added theGripVertical
icon to serve as a drag handle for each question card. [1] [2]clients/core/src/Application/ApplicationConfiguration/ApplicationQuestionConfig/components/ApplicationQuestionCard.tsx
: Updated the card layout to better accommodate the drag handle and improve the display of question details. [1] [2]